home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / if.n < prev    next >
Text File  |  1995-07-25  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4.      iiiiffff((((nnnn))))                        TTTTccccllll (((( ))))                        iiiiffff((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           if - Execute scripts conditionally
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           iiiiffff _e_x_p_r_1 ?tttthhhheeeennnn? _b_o_d_y_1 eeeellllsssseeeeiiiiffff _e_x_p_r_2 ?tttthhhheeeennnn? _b_o_d_y_2  eeeellllsssseeeeiiiiffff  ...
  15.           ?eeeellllsssseeee? ?_b_o_d_y_N?
  16.      _________________________________________________________________
  17.  
  18.  
  19.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.           The _i_f command evaluates _e_x_p_r_1 as an expression (in the same
  21.           way  that  eeeexxxxpppprrrr  evaluates  its argument).  The value of the
  22.           expression must be a boolean (a numeric value,  where  0  is  |
  23.           false  and  anything is true, or a string value such as ttttrrrruuuueeee  |
  24.           or yyyyeeeessss for true and ffffaaaallllsssseeee or nnnnoooo for false); if  it  is  true
  25.           then _b_o_d_y_1 is executed by passing it to the Tcl interpreter.
  26.           Otherwise _e_x_p_r_2 is evaluated as an expression and if  it  is
  27.           true  then  bbbbooooddddyyyy2222  is  executed,  and so on.  If none of the
  28.           expressions evaluates to true then _b_o_d_y_N is  executed.   The
  29.           tttthhhheeeennnn and eeeellllsssseeee arguments are optional ``noise words'' to make
  30.           the command easier to read.  There  may  be  any  number  of
  31.           eeeellllsssseeeeiiiiffff  clauses,  including zero.  _B_o_d_y_N may also be omitted
  32.           as long as eeeellllsssseeee is omitted too.  The return value  from  the
  33.           command  is the result of the body script that was executed,
  34.           or an empty string if none of the expressions  was  non-zero
  35.           and there was no _b_o_d_y_N.
  36.  
  37.  
  38.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  39.           boolean, conditional, else, false, if, true
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/17/95)
  64.  
  65.  
  66.  
  67.